package com.fishleap.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fishleap.entity.Article;
import com.fishleap.mapper.ArticleMapper;
import com.fishleap.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zlg
 * @create 2020-05-24 9:00
 */
@Service
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public IPage<Article> selectPageArticle(Page<Article> articlePage) {
        // 要点!! 分页返回的对象与传入的对象是同一个
        return articleMapper.selectPageVo(articlePage);
    }
}
